import { LayerGlobalConfigure } from "slash-layer/dist/packages/components/Layer/ts/LayerConfigureDefinition";
import { LayerBaseContainer } from "slash-admin";

export const config = {
  title: "自定义全局标题",
  max: true,
  min: true,
  loadingTime: 500,
  header: true,
  allowMove: true,
  mask: true,
  autoInfo: true,
  baseComponent: LayerBaseContainer,
  /** content扩展属性 */
  extendComponentProps: {
    // isAnchor: true
  },
  successDecide(msg: any) {
    console.log(msg);
    if (msg.code == 200) {
      return {
        msg: msg.msg, result: true, data: msg.data
      };
    } else {
      return {
        msg: msg.msg, result: false, data: msg.data
      };
    }
  },
  success(msg: string, config: any) {
    window.$message.success(msg);
  },
  info(msg: string, config: any) {
    window.$message.info(msg);

  },
  error(msg: string, config: any) {
    console.log(msg);
    window.$message.error(msg);
  }
} as unknown as LayerGlobalConfigure;
export default config;
